AvailableStockLocates
This table shows the available (unused) locates for each locate pool and firm. Value update as trades occur that utilizes existing locates.
METADATA
Attribute | Value |
---|---|
Topic | 1725-client-borrow |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | |
ticker_ts | enum - TickerSrc | PRI | 'None' | |
ticker_tk | VARCHAR(12) | PRI | '' | |
coreClientFirm | VARCHAR(16) | PRI | '' | |
locateFirm | VARCHAR(6) | PRI | '' | |
locatePool | VARCHAR(16) | PRI | '' | locate pool firm granting the locate |
tradeDate | DATE | PRI | '1900-01-01' | |
locateQuan | INT | 0 | locate quantity sourced | |
locateQuanUsed | INT | 0 | shares sold short against this locate | |
availableLocateQuan | INT | 0 | locate balance currently available | |
isLocateExempt | enum - YesNo | 'None' | only market makers can be exempt | |
engineName | VARCHAR(32) | '' | SR server code | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
coreClientFirm | 4 |
locateFirm | 5 |
locatePool | 6 |
tradeDate | 7 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgAvailableStockLocates` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`coreClientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`locateFirm` VARCHAR(6) NOT NULL DEFAULT '',
`locatePool` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'locate pool @ firm granting the locate',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`locateQuan` INT NOT NULL DEFAULT 0 COMMENT 'locate quantity sourced',
`locateQuanUsed` INT NOT NULL DEFAULT 0 COMMENT 'shares sold short against this locate',
`availableLocateQuan` INT NOT NULL DEFAULT 0 COMMENT 'locate balance currently available',
`isLocateExempt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'only market makers can be exempt',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'SR server code',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`coreClientFirm`,`locateFirm`,`locatePool`,`tradeDate`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table shows the available (unused) locates for each locate pool and firm. Value update as trades occur that utilizes existing locates.';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`coreClientFirm`,
`locateFirm`,
`locatePool`,
`tradeDate`,
`locateQuan`,
`locateQuanUsed`,
`availableLocateQuan`,
`isLocateExempt`,
`engineName`,
`timestamp`
FROM `SRControl`.`MsgAvailableStockLocates`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`coreClientFirm` = 'Example_coreClientFirm'
AND
/* Replace with a VARCHAR(6) */
`locateFirm` = 'Example_locateFirm'
AND
/* Replace with a VARCHAR(16) */
`locatePool` = 'Example_locatePool'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='AvailableStockLocates' ORDER BY ordinal_position ASC;